Friendlier handling of default webhook values on bot launch #1263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I have noticed that when inexperienced people just getting started on the project go through all the hoops of cloning the repository, setting up their Discord bots, creating their test server, they end up compiling the code in IDEs like IntelliJ IDEA and assuming they just change the token on their
config.json
, there are stacktraces and errors thrown once they attempt to run the bot. Specifically:For the average software engineer, they would be aware that the program is still running and that the bot is ready, but two things:
What I've done
This commit prints a friendly warning in the logger and no stacktrace in case the user has not updated the webhooks (which most of them will not have to, as they are primarily concerned with the Discord bot's token).
We hide the stacktrace in case there is a
<put_your_webhook_here>
value in thelogInfoChannelWebhook
andlogErrorChannelWebhook
configuration keys so that IntelliJ IDEA does not put the stacktrace in the spotlight and potentially scare new contributors.